package com.bee.bootstrap.roleResource.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.bee.bootstrap.resource.entity.Resource;
import com.bee.bootstrap.role.entity.Role;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author liekkas
 * @since 2018-05-25
 */
@TableName("base_role_resource")
@Data
public class RoleResource extends Model<RoleResource> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.ID_WORKER)
	private Long id;
    /**
     * 角色Id
     */
	@TableField("role_id")
	private Long roleId;
    /**
     * 资源Id
     */
	@TableField("resource_id")
	private Long resourceId;
	/**
	 * 数据选项级别
	 */
	@TableField("permission_level")
	private String permissionLevel;
    /**
     * 创建时间
     */
	@TableField("create_time")
	private Date createTime;
    /**
     * 有效时间
     */
	@TableField("update_time")
	private Date updateTime;

	private transient Role role;

	private transient Resource resource;

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
